<%--
  Created by IntelliJ IDEA.
  User: 吕旺平
  Date: 2019/12/17
  Time: 8:12
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="f" uri="http://fentsoul.com" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
	<title>我的订单</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<jsp:include page="/layout/_imports.jsp"></jsp:include>
</head>
<body>

<jsp:include page="/layout/_nav.jsp"></jsp:include>

<!--cart-items-->
<div class="cart-items">
	<div class="container">
		<h2>我的订单</h2>

		<table class="table table-bordered table-hover">
			<tr>
				<th width="10%">ID</th>
				<th width="10%">总价</th>
				<th width="20%">商品详情</th>
				<th width="20%">收货信息</th>
				<th width="10%">订单状态</th>
				<th width="10%">支付方式</th>
				<th width="10%">下单时间</th>
				<th width="10%">操作</th>
			</tr>

			<f:foreach jsp_for="orders" var="o">
				<tr>
					<td><p>${o.id}</p></td>
					<td><p>${o.total}</p></td>
					<td>
						<c:forEach items="${o.ois}" var="oi">
							<p>${oi.goods.name}(${oi.price}) x ${oi.amount}</p>
						</c:forEach>
					</td>
					<td>
						<p></p>
						<p></p>
						<p></p>
					</td>
					<td>
						<c:choose>
							<c:when test="${o.status == 0}">
								<p>
									<span style="color:grey;">购物车</span>
								</p>
							</c:when>
							<c:when test="${o.status == 1}">
								<p>
									<span style="color:red;">已下单</span>
								</p>
							</c:when>
							<c:when test="${o.status == 2}">
								<p>
									<span style="color:darkgreen;">已付款</span>
								</p>
							</c:when>
							<c:when test="${o.status == 3}">
								<p>
									<span style="color:yellow;">配送中</span>
								</p>
							</c:when>
							<c:when test="${o.status == 4}">
								<p>
									<span style="color:black;">已收货</span>
								</p>
							</c:when>
						</c:choose>
					</td>
					<td>
						<c:choose>
							<c:when test="${o.payType == -1}"><p>无</p></c:when>
							<c:when test="${o.payType == 1}"><p>微信</p></c:when>
							<c:when test="${o.payType == 2}"><p>支付宝</p></c:when>
							<c:when test="${o.payType == 3}"><p>货到付款</p></c:when>
						</c:choose>
					</td>
					<td><p>${o.datetime}</p></td>
					<td>

					</td>
				</tr>
			</f:foreach>

		</table>




	</div>
</div>
<!--//cart-items-->



<jsp:include page="/layout/_footer.jsp"></jsp:include>


</body>
</html>